home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / dynSetClipEffectsOptionVars. < prev    next >
Encoding:
Text File  |  2003-07-17  |  28.8 KB  |  970 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. //
  18. //  Alias|Wavefront Script File
  19. //  MODIFY THIS AT YOUR OWN RISK
  20. //
  21. //  Creation Date:  July, 1998
  22. //  Author:         Carol Levy
  23. //
  24. //  Description:
  25. //      This script contains code to create and/or set the default
  26. //        values for the option vars for the Dynamics Clip Effects
  27. //        menus/option boxes.
  28. //
  29. //
  30. //  ================ dynSetClipEffectsOptionVars ================
  31. //
  32. //  SYNOPSIS
  33. //      Set the specified sprite clip effect option box controls.
  34. //
  35. //  INPUT ARGUMENTS
  36. //        string $theClipEffect    the name of the clip effect to set controls for
  37. //        int $setFactorySettings whether to use default settings.
  38. //
  39. //
  40. global proc dynSetClipEffectsOptionVars(string $theClipEffect, int $setFactorySettings)
  41. {
  42.     if (!isValidClipEffect($theClipEffect))
  43.         return;
  44.  
  45.     string $procName = ("set"+$theClipEffect+"OptionVars");
  46.     eval ($procName+" "+$setFactorySettings);
  47. }
  48.  
  49.  
  50. //  ================ setSmokeOptionVars ================
  51. //
  52. //  SYNOPSIS
  53. //      Set the smoke sprite clip effect option box optionVars.
  54. //
  55. //  INPUT ARGUMENTS
  56. //        int $setFactorySettings whether to use default settings.
  57. //
  58. //
  59. global proc setSmokeOptionVars (int $setFactorySettings)
  60. {
  61.     
  62.     // Option vars for the image attributes.
  63.     //
  64.     if( $setFactorySettings || !`optionVar -exists smokeImageName` ) 
  65.     {
  66.         optionVar -stringValue smokeImageName ""; 
  67.     } 
  68.     if( $setFactorySettings || !`optionVar -exists smokeCycleImages` ) 
  69.     {
  70.         optionVar -intValue smokeCycleImages 0 ; 
  71.     } 
  72.     if( $setFactorySettings || !`optionVar -exists smokeStartImage` ) 
  73.     {
  74.         optionVar -intValue smokeStartImage 0; 
  75.     } 
  76.     if( $setFactorySettings || !`optionVar -exists smokeEndImage` ) 
  77.     {
  78.         optionVar -intValue smokeEndImage 50; 
  79.     } 
  80.  
  81.     // Option vars for the smoke attributes.
  82.     //
  83.     if( $setFactorySettings || !`optionVar -exists smokeParticleName` ) 
  84.     {
  85.         optionVar -stringValue smokeParticleName ""; 
  86.     } 
  87.     if( $setFactorySettings || !`optionVar -exists smokeMinLifespan` ) 
  88.     {
  89.         optionVar -floatValue smokeMinLifespan 3.0; 
  90.     } 
  91.     if( $setFactorySettings || !`optionVar -exists smokeMaxLifespan` ) 
  92.     {
  93.         optionVar -floatValue smokeMaxLifespan 7.0; 
  94.     }
  95.     if( $setFactorySettings || !`optionVar -exists smokeThreshold` ) 
  96.     {
  97.         optionVar -floatValue smokeThreshold 0.25; 
  98.     }  
  99.     if( $setFactorySettings || !`optionVar -exists smokeOpacity` ) 
  100.     {
  101.         optionVar -floatValue smokeOpacity .4; 
  102.     }  
  103.  
  104.     // Option vars for the smoke emission attributes.
  105.     //
  106.     if( $setFactorySettings || !`optionVar -exists smokeEmitterName` ) 
  107.     {
  108.         optionVar -stringValue smokeEmitterName ""; 
  109.     } 
  110.     if( $setFactorySettings || !`optionVar -exists smokeEmissionRate` ) 
  111.     {
  112.         optionVar -floatValue smokeEmissionRate 112.4; 
  113.     }  
  114.     if( $setFactorySettings || !`optionVar -exists smokeEmissionSpread` ) 
  115.     {
  116.         optionVar -floatValue smokeEmissionSpread .11; 
  117.     }  
  118.     if( $setFactorySettings || !`optionVar -exists smokeEmissionSpeed` ) 
  119.     {
  120.         optionVar -floatValue smokeEmissionSpeed 1.0; 
  121.     }  
  122.     if( $setFactorySettings || !`optionVar -exists smokeEmissionDirX` ) 
  123.     {
  124.         optionVar -floatValue smokeEmissionDirX 0.0; 
  125.     }  
  126.     if( $setFactorySettings || !`optionVar -exists smokeEmissionDirY` ) 
  127.     {
  128.         optionVar -floatValue smokeEmissionDirY 1.0; 
  129.     }  
  130.     if( $setFactorySettings || !`optionVar -exists smokeEmissionDirZ` ) 
  131.     {
  132.         optionVar -floatValue smokeEmissionDirZ 0.0; 
  133.     }  
  134.  
  135.     // Option vars for the turbulence attributes.
  136.     //
  137.     if( $setFactorySettings || !`optionVar -exists smokeUseTurbulence` ) 
  138.     {
  139.         optionVar -intValue smokeUseTurbulence 1 ; 
  140.     } 
  141.  
  142.     if( $setFactorySettings || !`optionVar -exists smokeTurbulenceName` ) 
  143.     {
  144.         optionVar -stringValue smokeTurbulenceName ""; 
  145.     } 
  146.     if( $setFactorySettings || !`optionVar -exists smokeTurbulenceMagnitude` ) 
  147.     {
  148.         optionVar -floatValue smokeTurbulenceMagnitude 0.2; 
  149.     }  
  150.     if( $setFactorySettings || !`optionVar -exists smokeTurbulenceFrequency` ) 
  151.     {
  152.         optionVar -floatValue smokeTurbulenceFrequency 2.0; 
  153.     }  
  154.     if( $setFactorySettings || !`optionVar -exists smokeTurbulenceAttenuation` ) 
  155.     {
  156.         optionVar -floatValue smokeTurbulenceAttenuation 2.8; 
  157.     }  
  158.  
  159. }
  160.  
  161.  
  162. //  ================ setFireOptionVars ================
  163. //
  164. //  SYNOPSIS
  165. //      Set the fire clip effect option box optionVars.
  166. //
  167. //  INPUT ARGUMENTS
  168. //        int $setFactorySettings whether to use default settings.
  169. //
  170. //
  171. global proc setFireOptionVars (int $setFactorySettings)
  172. {
  173.     // Option vars for the fire object and particle names.
  174.     //
  175.     if( $setFactorySettings || !`optionVar -exists fireObject` ) 
  176.     {
  177.         optionVar -stringValue fireObject ""; 
  178.     } 
  179.     if( $setFactorySettings || !`optionVar -exists fireParticleName` ) 
  180.     {
  181.         optionVar -stringValue fireParticleName ""; 
  182.     } 
  183.  
  184.     // Option var for the emitter type.
  185.     //
  186.     if( $setFactorySettings || !`optionVar -exists fireEmissionTypeOV`) 
  187.     {
  188.         optionVar -intValue fireEmissionTypeOV 3; 
  189.     }  
  190.  
  191.     // Option vars for the fire attributes.
  192.     //
  193.     if( $setFactorySettings || !`optionVar -exists fireDensity` ) 
  194.     {
  195.         optionVar -floatValue fireDensity 10; 
  196.     }  
  197.     if( $setFactorySettings || !`optionVar -exists fireStartRadius` ) 
  198.     {
  199.         optionVar -floatValue fireStartRadius 1.0; 
  200.     }  
  201.     if( $setFactorySettings || !`optionVar -exists fireEndRadius` ) 
  202.     {
  203.         optionVar -floatValue fireEndRadius 0.4; 
  204.     }  
  205.     if( $setFactorySettings || !`optionVar -exists fireIntensity` ) 
  206.     {
  207.         optionVar -floatValue fireIntensity .35; 
  208.     }  
  209.     if( $setFactorySettings || !`optionVar -exists fireSpread` ) 
  210.     {
  211.         optionVar -floatValue fireSpread .15; 
  212.     }  
  213.     if( $setFactorySettings || !`optionVar -exists fireScale` ) 
  214.     {
  215.         optionVar -floatValue fireScale 1; 
  216.     }  
  217.     if( $setFactorySettings || !`optionVar -exists fireTurbulence` ) 
  218.     {
  219.         optionVar -floatValue fireTurbulence 240; 
  220.     }  
  221.     if( $setFactorySettings || !`optionVar -exists fireSpeed` ) 
  222.     {
  223.         optionVar -floatValue fireSpeed 85; 
  224.     }  
  225.  
  226.     // Option vars for the fire direction.
  227.     //
  228.     if( $setFactorySettings || !`optionVar -exists fireDirectionX` ) 
  229.     {
  230.         optionVar -floatValue fireDirectionX 0.0; 
  231.     }  
  232.     if( $setFactorySettings || !`optionVar -exists fireDirectionY` ) 
  233.     {
  234.         optionVar -floatValue fireDirectionY 1.0; 
  235.     }  
  236.     if( $setFactorySettings || !`optionVar -exists fireDirectionZ` ) 
  237.     {
  238.         optionVar -floatValue fireDirectionZ 0.0; 
  239.     }  
  240. }
  241.  
  242.  
  243. //  ================ setFireworksOptionVars ================
  244. //
  245. //  SYNOPSIS
  246. //      Set the fireworks clip effect option box optionVars.
  247. //
  248. //  INPUT ARGUMENTS
  249. //        int $setFactorySettings whether to use default settings.
  250. //
  251. //
  252. global proc setFireworksOptionVars (int $setFactorySettings)
  253. {
  254.     // Option var for the fireworks name.
  255.     //
  256.     if( $setFactorySettings || !`optionVar -exists fireworksName` ) 
  257.     {
  258.         optionVar -stringValue fireworksName ""; 
  259.     } 
  260.  
  261.     if( $setFactorySettings || !`optionVar -exists fwNumRockets` ) 
  262.     {
  263.         optionVar -intValue fwNumRockets 10; 
  264.     } 
  265.  
  266.     if( $setFactorySettings || !`optionVar -exists fwLaunchPositionX` ) 
  267.     {
  268.         optionVar -floatValue fwLaunchPositionX 0; 
  269.     } 
  270.     if( $setFactorySettings || !`optionVar -exists fwLaunchPositionY` ) 
  271.     {
  272.         optionVar -floatValue fwLaunchPositionY 0; 
  273.     } 
  274.     if( $setFactorySettings || !`optionVar -exists fwLaunchPositionZ` ) 
  275.     {
  276.         optionVar -floatValue fwLaunchPositionZ 0; 
  277.     } 
  278.     if( $setFactorySettings || !`optionVar -exists fwBurstPosCenterX` ) 
  279.     {
  280.         optionVar -floatValue fwBurstPosCenterX 0; 
  281.     } 
  282.     if( $setFactorySettings || !`optionVar -exists fwBurstPosCenterY` ) 
  283.     {
  284.         optionVar -floatValue fwBurstPosCenterY 25; 
  285.     } 
  286.     if( $setFactorySettings || !`optionVar -exists fwBurstPosCenterZ` ) 
  287.     {
  288.         optionVar -floatValue fwBurstPosCenterZ 0; 
  289.     } 
  290.     if( $setFactorySettings || !`optionVar -exists fwBurstExtentsX` ) 
  291.     {
  292.         optionVar -floatValue fwBurstExtentsX 10; 
  293.     } 
  294.     if( $setFactorySettings || !`optionVar -exists fwBurstExtentsY` ) 
  295.     {
  296.         optionVar -floatValue fwBurstExtentsY 10; 
  297.     } 
  298.     if( $setFactorySettings || !`optionVar -exists fwBurstExtentsZ` ) 
  299.     {
  300.         optionVar -floatValue fwBurstExtentsZ 10; 
  301.     } 
  302.  
  303.     if( $setFactorySettings || !`optionVar -exists fwFirstLaunchFrame` ) 
  304.     {
  305.         optionVar -floatValue fwFirstLaunchFrame 1; 
  306.     } 
  307.     if( $setFactorySettings || !`optionVar -exists fwLaunchRate` ) 
  308.     {
  309.         optionVar -floatValue fwLaunchRate .1; 
  310.     } 
  311.     if( $setFactorySettings || !`optionVar -exists fwMinFlightTime` ) 
  312.     {
  313.         optionVar -floatValue fwMinFlightTime 30; 
  314.     } 
  315.     if( $setFactorySettings || !`optionVar -exists fwMaxFlightTime` ) 
  316.     {
  317.         optionVar -floatValue fwMaxFlightTime 60; 
  318.     } 
  319.  
  320.     if( $setFactorySettings || !`optionVar -exists fwMaxBurstSpeed` ) 
  321.     {
  322.         optionVar -floatValue fwMaxBurstSpeed 20; 
  323.     } 
  324.  
  325.  
  326.     if( $setFactorySettings || !`optionVar -exists fwTrailRate` ) 
  327.     {
  328.         optionVar -floatValue fwTrailRate 50; 
  329.     } 
  330.     if( $setFactorySettings || !`optionVar -exists fwTrailSpeed` ) 
  331.     {
  332.         optionVar -floatValue fwTrailSpeed 0.5; 
  333.     } 
  334.     if( $setFactorySettings || !`optionVar -exists fwTrailSpread` ) 
  335.     {
  336.         optionVar -floatValue fwTrailSpread 0.5; 
  337.     } 
  338.     if( $setFactorySettings || !`optionVar -exists fwMinTrailTailSize` ) 
  339.     {
  340.         optionVar -floatValue fwMinTrailTailSize .2; 
  341.     } 
  342.     if( $setFactorySettings || !`optionVar -exists fwMaxTrailTailSize` ) 
  343.     {
  344.         optionVar -floatValue fwMaxTrailTailSize .8; 
  345.     } 
  346.  
  347.  
  348.     if( $setFactorySettings || !`optionVar -exists fwTrailSetUserColor` ) 
  349.     {
  350.         optionVar -intValue fwTrailSetUserColor 0; 
  351.     } 
  352.     if( $setFactorySettings || !`optionVar -exists fwTrailColorCreationProc` ) 
  353.     {
  354.         optionVar -stringValue fwTrailColorCreationProc ""; 
  355.     } 
  356.     if( $setFactorySettings || !`optionVar -exists fwTrailNumColors` ) 
  357.     {
  358.         optionVar -intValue fwTrailNumColors 5; 
  359.     } 
  360.     if( $setFactorySettings || !`optionVar -exists fwTrailGlowIntensity` ) 
  361.     {
  362.         optionVar -floatValue fwTrailGlowIntensity .3; 
  363.     } 
  364.     if( $setFactorySettings || !`optionVar -exists fwTrailIncanIntensity` ) 
  365.     {
  366.         optionVar -floatValue fwTrailIncanIntensity .25; 
  367.     } 
  368.  
  369.     if( $setFactorySettings || !`optionVar -exists fwMinSparksCount` ) 
  370.     {
  371.         optionVar -floatValue fwMinSparksCount 100; 
  372.     } 
  373.     if( $setFactorySettings || !`optionVar -exists fwMaxSparksCount` ) 
  374.     {
  375.         optionVar -floatValue fwMaxSparksCount 200; 
  376.     } 
  377.     if( $setFactorySettings || !`optionVar -exists fwMinSparksTailSize` ) 
  378.     {
  379.         optionVar -floatValue fwMinSparksTailSize .3; 
  380.     } 
  381.     if( $setFactorySettings || !`optionVar -exists fwMaxSparksTailSize` ) 
  382.     {
  383.         optionVar -floatValue fwMaxSparksTailSize 1; 
  384.     } 
  385.  
  386.     if( $setFactorySettings || !`optionVar -exists fwSparksSetUserColor` ) 
  387.     {
  388.         optionVar -intValue fwSparksSetUserColor 0; 
  389.     } 
  390.     if( $setFactorySettings || !`optionVar -exists fwSparksColorCreationProc` ) 
  391.     {
  392.         optionVar -stringValue fwSparksColorCreationProc ""; 
  393.     } 
  394.     if( $setFactorySettings || !`optionVar -exists fwSparksNumColors` ) 
  395.     {
  396.         optionVar -intValue fwSparksNumColors 32; 
  397.     } 
  398.     if( $setFactorySettings || !`optionVar -exists fwSparksColorSpread` ) 
  399.     {
  400.         optionVar -intValue fwSparksColorSpread 1; 
  401.     } 
  402.     if( $setFactorySettings || !`optionVar -exists fwSparksGlowIntensity` ) 
  403.     {
  404.         optionVar -floatValue fwSparksGlowIntensity .3; 
  405.     } 
  406.     if( $setFactorySettings || !`optionVar -exists fwSparksIncanIntensity` ) 
  407.     {
  408.         optionVar -floatValue fwSparksIncanIntensity .25; 
  409.     } 
  410.  
  411. }
  412.  
  413.  
  414. //  ================ setFlowOptionVars ================
  415. //
  416. //  SYNOPSIS
  417. //      Set the flow-along-curve clip effect option box optionVars.
  418. //
  419. //  INPUT ARGUMENTS
  420. //        int $setFactorySettings whether to use default settings.
  421. //
  422. //
  423. global proc setFlowOptionVars (int $setFactorySettings)
  424. {
  425.     // Option var for the melt object.
  426.     //
  427.     if( $setFactorySettings || !`optionVar -exists flowObject` ) 
  428.     {
  429.         optionVar -stringValue flowObject ""; 
  430.     } 
  431.  
  432.     // Option vars for the flow creation controls.
  433.     //
  434.     if( $setFactorySettings || !`optionVar -exists flowAttachEmitter` ) 
  435.     {
  436.         optionVar -intValue flowAttachEmitter 1 ; 
  437.     } 
  438.     if( $setFactorySettings || !`optionVar -exists flowNumControlSegs` ) 
  439.     {
  440.         optionVar -floatValue flowNumControlSegs 5; 
  441.     }  
  442.     if( $setFactorySettings || !`optionVar -exists flowNumControlSubsegs` ) 
  443.     {
  444.         optionVar -floatValue flowNumControlSubsegs 4; 
  445.     }  
  446.  
  447.     // Option vars for the flow attributes.
  448.     //
  449.     if( $setFactorySettings || !`optionVar -exists flowEmitterRate` ) 
  450.     {
  451.         optionVar -floatValue flowEmitterRate 50; 
  452.     }  
  453.     if( $setFactorySettings || !`optionVar -exists flowRandomMotion` ) 
  454.     {
  455.         optionVar -floatValue flowRandomMotion .5; 
  456.     }  
  457.     if( $setFactorySettings || !`optionVar -exists flowLifespan` ) 
  458.     {
  459.         optionVar -floatValue flowLifespan 5; 
  460.     }  
  461.     if( $setFactorySettings || !`optionVar -exists flowGoalWeight` ) 
  462.     {
  463.         optionVar -floatValue flowGoalWeight 1;
  464.     }  
  465. }
  466.  
  467.  
  468. //  ================ setSurfaceFlowOptionVars ================
  469. //
  470. //  SYNOPSIS
  471. //      Set the flow-along-surface clip effect option box optionVars.
  472. //
  473. //  INPUT ARGUMENTS
  474. //        int $setFactorySettings whether to use default settings.
  475. //
  476. //
  477. global proc setSurfaceFlowOptionVars(int $setFactorySettings)
  478. {
  479.     // Option var for the surface flow object.
  480.     //
  481.     if( $setFactorySettings || !`optionVar -exists surfaceFlowObject` ) 
  482.     {
  483.         optionVar -stringValue surfaceFlowObject ""; 
  484.     }
  485.  
  486.     // Option vars for the flow creation controls.
  487.     //
  488.     if( $setFactorySettings || !`optionVar -exists surfaceFlowCreateParticle` ) 
  489.     {
  490.         optionVar -intValue surfaceFlowCreateParticle 1 ; 
  491.     }
  492.     if( $setFactorySettings || !`optionVar -exists surfaceFlowCreateParticleForEachFlow` ) 
  493.     {
  494.         optionVar -intValue surfaceFlowCreateParticleForEachFlow 0 ; 
  495.     }
  496.     if( $setFactorySettings || !`optionVar -exists surfaceFlowManipType` ) 
  497.     {
  498.         optionVar -stringValue  surfaceFlowManipType "u";
  499.     }
  500.     if( $setFactorySettings || !`optionVar -exists surfaceFlowControlResolution` ) 
  501.     {
  502.         optionVar -floatValue surfaceFlowControlResolution 5; 
  503.     }
  504.     if( $setFactorySettings || !`optionVar -exists surfaceFlowSubControlResolution` ) 
  505.     {
  506.         optionVar -floatValue surfaceFlowSubControlResolution 0; 
  507.     }
  508.     if( $setFactorySettings || !`optionVar -exists surfaceFlowManipulatorResolution` ) 
  509.     {
  510.         optionVar -floatValue surfaceFlowManipulatorResolution 2; 
  511.     }
  512.  
  513.     // Option vars for the flow attributes.
  514.     //
  515.     if( $setFactorySettings || !`optionVar -exists surfaceFlowGoalWeight` ) 
  516.     {
  517.         optionVar -floatValue surfaceFlowGoalWeight 1;
  518.     }
  519.     if( $setFactorySettings || !`optionVar -exists surfaceFlowEmitterRate` ) 
  520.     {
  521.         optionVar -floatValue surfaceFlowEmitterRate 10; 
  522.     }
  523.     if($setFactorySettings || !`optionVar -exists surfaceFlowParticleLifespan`)
  524.     {
  525.         optionVar -floatValue surfaceFlowParticleLifespan 1.0; 
  526.     }
  527.     if( $setFactorySettings || !`optionVar -exists surfaceFlowMinAgeRatio` ) 
  528.     {
  529.         optionVar -floatValue surfaceFlowMinAgeRatio 0; 
  530.     }
  531.     if( $setFactorySettings || !`optionVar -exists surfaceFlowMaxAgeRatio` ) 
  532.     {
  533.         optionVar -floatValue surfaceFlowMaxAgeRatio 1;
  534.     }
  535. }
  536.  
  537.  
  538. //  ================ setDeleteSurfaceFlowOptionVars ================
  539. //
  540. //  SYNOPSIS
  541. //      Set the delete-surface-flow clip effect option box optionVars.
  542. //
  543. //  INPUT ARGUMENTS
  544. //        int $setFactorySettings whether to use default settings.
  545. //
  546. //
  547. global proc setDeleteSurfaceFlowOptionVars(int $setFactorySettings)
  548. {
  549.     if( $setFactorySettings || !`optionVar -exists deleteSurfaceFlow` )
  550.     {
  551.         optionVar -intValue deleteSurfaceFlow 1 ;
  552.     }
  553.     if( $setFactorySettings || !`optionVar -exists removeParticlesFromSurfaceFlow` )
  554.     {
  555.         optionVar -intValue removeParticlesFromSurfaceFlow 0 ;
  556.     }
  557.     if( $setFactorySettings || !`optionVar -exists deleteSurfaceFlowParticles`)
  558.     {
  559.         optionVar -intValue deleteSurfaceFlowParticles 0 ;
  560.     }
  561.  
  562.     int $checkBoxExist = `checkBoxGrp -exists deleteSurfaceFlowParticles`;
  563.     if( $checkBoxExist )
  564.     {
  565.         int $removeParticles = 0;
  566.         int $radioExist = `optionVar -exists removeParticlesFromSurfaceFlow`;
  567.         if( $radioExist )
  568.             $removeParticles = `optionVar -q removeParticlesFromSurfaceFlow`;
  569.         if( $removeParticles )
  570.             checkBoxGrp -e -enable 0 deleteSurfaceFlowParticles;
  571.         else
  572.             checkBoxGrp -e -enable 1 deleteSurfaceFlowParticles;
  573.     }
  574. }
  575.  
  576.  
  577. //  ================ setLightningOptionVars ================
  578. //
  579. //  SYNOPSIS
  580. //      Set the lightning clip effect option box optionVars.
  581. //
  582. //  INPUT ARGUMENTS
  583. //        int $setFactorySettings whether to use default settings.
  584. //
  585. //
  586. global proc setLightningOptionVars(int $setFactorySettings)
  587. {
  588.     // Option var for the surface flow object.
  589.     //
  590.     if( $setFactorySettings || !`optionVar -exists lightningObject` ) 
  591.     {
  592.         optionVar -stringValue lightningObject "";
  593.     }
  594.  
  595.     // Option vars for the flow creation controls.
  596.     //
  597.     if( $setFactorySettings || !`optionVar -exists lightningGrouping` ) 
  598.     {
  599.         optionVar -intValue lightningGrouping 0 ; 
  600.     }
  601.     if( $setFactorySettings || !`optionVar -exists lightningCreateOptions` )
  602.     {
  603.         optionVar -intValue lightningCreateOptions 1 ;
  604.     }
  605.     if( $setFactorySettings || !`optionVar -exists lightningCurveSegments` ) 
  606.     {
  607.         optionVar -intValue lightningCurveSegments 20;
  608.     }
  609.     if( $setFactorySettings || !`optionVar -exists lightningThickness` ) 
  610.     {
  611.         optionVar -floatValue lightningThickness 1;
  612.     }
  613.     if( $setFactorySettings || !`optionVar -exists lightningMaxSpread` ) 
  614.     {
  615.         optionVar -floatValue lightningMaxSpread 1;
  616.     }
  617.     if( $setFactorySettings || !`optionVar -exists lightningStart` ) 
  618.     {
  619.         optionVar -floatValue lightningStart 0;
  620.     }
  621.     if( $setFactorySettings || !`optionVar -exists lightningEnd` ) 
  622.     {
  623.         optionVar -floatValue lightningEnd 1;
  624.     }
  625.     if( $setFactorySettings || !`optionVar -exists lightningGlowIntensity` ) 
  626.     {
  627.         optionVar -floatValue lightningGlowIntensity 0.5;
  628.     }
  629. }
  630.  
  631.  
  632. //  ================ setMeltOptionVars ================
  633. //
  634. //  SYNOPSIS
  635. //      Set the melt clip effect option box optionVars.
  636. //
  637. //  INPUT ARGUMENTS
  638. //        int $setFactorySettings whether to use default settings.
  639. //
  640. //
  641. global proc setMeltOptionVars (int $setFactorySettings)
  642. {
  643.     // Option vars for the melt object and melt-on object names.
  644.     //
  645.     if( $setFactorySettings || !`optionVar -exists meltObject` ) 
  646.     {
  647.         optionVar -stringValue meltObject ""; 
  648.     } 
  649.     if( $setFactorySettings || !`optionVar -exists meltOnObject` ) 
  650.     {
  651.         optionVar -stringValue meltOnObject ""; 
  652.     } 
  653.  
  654.     // Option vars for the melt attributes.
  655.     //
  656.     if( $setFactorySettings || !`optionVar -exists meltSpeed` ) 
  657.     {
  658.         optionVar -floatValue meltSpeed .4; 
  659.     }  
  660.     if( $setFactorySettings || !`optionVar -exists meltSpread` ) 
  661.     {
  662.         optionVar -floatValue meltSpread 1.0; 
  663.     }  
  664.     if( $setFactorySettings || !`optionVar -exists meltDistortion` ) 
  665.     {
  666.         optionVar -floatValue meltDistortion 1.5; 
  667.     }  
  668.  
  669.     // Option vars for the melt direction.
  670.     //
  671.     if( $setFactorySettings || !`optionVar -exists meltDirectionX` ) 
  672.     {
  673.         optionVar -floatValue meltDirectionX 0.0; 
  674.     }  
  675.     if( $setFactorySettings || !`optionVar -exists meltDirectionY` ) 
  676.     {
  677.         optionVar -floatValue meltDirectionY -1.0; 
  678.     }  
  679.     if( $setFactorySettings || !`optionVar -exists meltDirectionZ` ) 
  680.     {
  681.         optionVar -floatValue meltDirectionZ 0.0; 
  682.     }  
  683.  
  684.     // Option vars for the melt control resolution.
  685.     //
  686.     if( $setFactorySettings || !`optionVar -exists meltUseLatticeRes` ) 
  687.     {
  688.         optionVar -intValue meltUseLatticeRes 0 ; 
  689.     } 
  690.     if( $setFactorySettings || !`optionVar -exists meltLatticeResX` ) 
  691.     {
  692.         optionVar -intValue meltLatticeResX 0; 
  693.     }  
  694.     if( $setFactorySettings || !`optionVar -exists meltLatticeResY` ) 
  695.     {
  696.         optionVar -intValue meltLatticeResY 0;
  697.     }  
  698.     if( $setFactorySettings || !`optionVar -exists meltLatticeResZ` ) 
  699.     {
  700.         optionVar -intValue meltLatticeResZ 0; 
  701.     }  
  702. }
  703.  
  704. //  ================ setShatterOptionVars ================
  705. //
  706. //  SYNOPSIS
  707. //      Set the shatter clip effect option box optionVars.
  708. //
  709. //  INPUT ARGUMENTS
  710. //        int $setFactorySettings whether to use default settings.
  711. //
  712. //  OPTION VARIABLES
  713. //
  714. //        Variable        |   Type    | Values                | Default    | Notes
  715. //      ----------------+-----------+-----------------------+-----------+--------
  716. //      shatter type     :    string    | surface/solid/crack    : surface    : 
  717. //
  718. global proc setShatterOptionVars (int $setFactorySettings)
  719. {
  720.     if ( $setFactorySettings )
  721.     {
  722.         string $shatterTypeValue = `optionVar -query shatterType`;
  723.  
  724.         if ( $shatterTypeValue == "shatterSurfaceTab" )
  725.         {
  726.             setSurfaceShatterOptionVars( $setFactorySettings );
  727.         }
  728.         else if ( $shatterTypeValue == "shatterSolidTab" )
  729.         {
  730.             setSolidShatterOptionVars( $setFactorySettings );
  731.         }
  732.         else if ( $shatterTypeValue == "shatterCrackTab" )
  733.         {
  734.             setCrackShatterOptionVars( $setFactorySettings );
  735.         }
  736.     }
  737.     else
  738.     {
  739.         if ( !`optionVar -exists shatterType` ) 
  740.         {
  741.             optionVar -stringValue shatterType "shatterSurfaceTab"; 
  742.         }
  743.  
  744.         setSurfaceShatterOptionVars( $setFactorySettings );
  745.         setSolidShatterOptionVars  ( $setFactorySettings );
  746.         setCrackShatterOptionVars  ( $setFactorySettings );
  747.     }
  748. }
  749.  
  750.  
  751. //  ================ setSurfaceShatterOptionVars ================
  752. //
  753. //  SYNOPSIS
  754. //      Set the shatter clip effect option box optionVars.
  755. //
  756. //  INPUT ARGUMENTS
  757. //        int $setFactorySettings whether to use default settings.
  758. //
  759. //  OPTION VARIABLES
  760. //
  761. //        Variable        |   Type    | Values                | Default    | Notes
  762. //      ----------------+-----------+-----------------------+-----------+--------
  763. //      shatter name     :    string    | any string             : surfaceShatter    : 
  764. //      shard count     :    integer    | > 1                     : 5        : 
  765. //      smoothing        :    integer | on/off                : on        :
  766. //      extrude            :    integer | on/off                : off        :
  767. //      triangulate        :    integer | on/off                : on        : 
  768. //      post operation     :    string    | sets/soft/rigid        : sets        : 
  769. //      edge Perturb    :    float   | >= 0.0                 : 0.0        : 
  770. //      exact shards    :    integer | on/off                : on        : 
  771. //      seed            :    integer | 0 - 100                : 0            : 
  772. //      verbose            :    integer | on/off                : off        : 
  773. //
  774. global proc setSurfaceShatterOptionVars (int $setFactorySettings)
  775. {
  776.     if( $setFactorySettings || !`optionVar -exists shatterSurfaceName` ) 
  777.     {
  778.         optionVar -stringValue shatterSurfaceName "surfaceShatter"; 
  779.     } 
  780.     if( $setFactorySettings || !`optionVar -exists shatterSurfaceShardCount` ) 
  781.     {
  782.         optionVar -intValue shatterSurfaceShardCount 5; 
  783.     } 
  784.     if( $setFactorySettings || !`optionVar -exists shatterSurfaceTriangulate` ) 
  785.     {
  786.         optionVar -intValue shatterSurfaceTriangulate true; 
  787.     } 
  788.     if( $setFactorySettings || !`optionVar -exists shatterSurfaceSmoothing` ) 
  789.     {
  790.         optionVar -intValue shatterSurfaceSmoothing true; 
  791.     } 
  792.     if( $setFactorySettings || !`optionVar -exists shatterSurfaceExtrude` ) 
  793.     {
  794.         optionVar -floatValue shatterSurfaceExtrude 0.0; 
  795.     } 
  796.     if( $setFactorySettings || !`optionVar -exists shatterSurfacePostOperation` ) 
  797.     {
  798.         optionVar -stringValue shatterSurfacePostOperation "shapes" ; 
  799.     } 
  800. //    if( $setFactorySettings || !`optionVar -exists shatterSurfaceEdgePerturbation` ) 
  801. //    {
  802. //        optionVar -floatValue shatterSurfaceEdgePerturbation 0.0; 
  803. //    } 
  804.     if( $setFactorySettings || !`optionVar -exists shatterSurfaceExactCount` ) 
  805.     {
  806.         optionVar -intValue shatterSurfaceExactCount true; 
  807.     } 
  808.     if( $setFactorySettings || !`optionVar -exists shatterSurfaceVerbose` ) 
  809.     {
  810.         optionVar -intValue shatterSurfaceVerbose false; 
  811.     } 
  812.     if( $setFactorySettings || !`optionVar -exists shatterSurfaceOriginal` ) 
  813.     {
  814.         optionVar -intValue shatterSurfaceOriginal 1; 
  815.     } 
  816.     if( $setFactorySettings || !`optionVar -exists shatterSurfaceMakeRigidBody` ) 
  817.     {
  818.         optionVar -intValue shatterSurfaceMakeRigidBody 1; 
  819.     } 
  820.     if( $setFactorySettings || !`optionVar -exists shatterSurfaceSeedValue` ) 
  821.     {
  822.         optionVar -intValue shatterSurfaceSeedValue 0; 
  823.     } 
  824. }
  825.  
  826.  
  827. //  ================ setSolidShatterOptionVars ================
  828. //
  829. //  SYNOPSIS
  830. //      Set the shatter clip effect option box optionVars.
  831. //
  832. //  INPUT ARGUMENTS
  833. //        int $setFactorySettings whether to use default settings.
  834. //
  835. //  OPTION VARIABLES
  836. //
  837. //        Variable        |   Type    | Values                | Default    | Notes
  838. //      ----------------+-----------+-----------------------+-----------+--------
  839. //      shatter name     :    string    | any string             : solidShatter    : 
  840. //      shard count     :    integer    | > 1                     : 5         : 
  841. //      triangulate        :    integer | on/off                : on        : 
  842. //      post operation     :    string    | shapes/sets/soft/rigid: sets        : 
  843. //      edge Perturb    :    float   | >= 0.0                 : 0.0        : 
  844. //      seed            :    integer | 0 - 100                : 0            : 
  845. //      verbose            :    integer | on/off                : off        : 
  846. //
  847. global proc setSolidShatterOptionVars (int $setFactorySettings)
  848. {
  849.     if( $setFactorySettings || !`optionVar -exists shatterSolidName` ) 
  850.     {
  851.         optionVar -stringValue shatterSolidName "solidShatter"; 
  852.     } 
  853.     if( $setFactorySettings || !`optionVar -exists shatterSolidShardCount` ) 
  854.     {
  855.         optionVar -intValue shatterSolidShardCount 5; 
  856.     } 
  857.     if( $setFactorySettings || !`optionVar -exists shatterSolidTriangulate` ) 
  858.     {
  859.         optionVar -intValue shatterSolidTriangulate true; 
  860.     } 
  861.     if( $setFactorySettings || !`optionVar -exists shatterSolidInteriorMaterial` ) 
  862.     {
  863.         optionVar -intValue shatterSolidInteriorMaterial true; 
  864.     } 
  865.     if( $setFactorySettings || !`optionVar -exists shatterSolidRemoveInterior` ) 
  866.     {
  867.         optionVar -intValue shatterSolidRemoveInterior false; 
  868.     } 
  869.     if( $setFactorySettings || !`optionVar -exists shatterSolidExtrude` ) 
  870.     {
  871.         optionVar -floatValue shatterSolidExtrude 0.0; 
  872.     } 
  873.     if( $setFactorySettings || !`optionVar -exists shatterSolidPostOperation` ) 
  874.     {
  875.         optionVar -stringValue shatterSolidPostOperation "shapes" ; 
  876.     } 
  877.     if( $setFactorySettings || !`optionVar -exists shatterSolidEdgePerturbation` ) 
  878.     {
  879.         optionVar -floatValue shatterSolidEdgePerturbation 0.0; 
  880.     } 
  881.     if( $setFactorySettings || !`optionVar -exists shatterSolidVerbose` ) 
  882.     {
  883.         optionVar -intValue shatterSolidVerbose false; 
  884.     } 
  885.     if( $setFactorySettings || !`optionVar -exists shatterSolidOriginal` ) 
  886.     {
  887.         optionVar -intValue shatterSolidOriginal 1; 
  888.     } 
  889.     if( $setFactorySettings || !`optionVar -exists shatterSolidMakeRigidBody` ) 
  890.     {
  891.         optionVar -intValue shatterSolidMakeRigidBody 1; 
  892.     } 
  893.     if( $setFactorySettings || !`optionVar -exists shatterSolidSeedValue` ) 
  894.     {
  895.         optionVar -intValue shatterSolidSeedValue 0; 
  896.     } 
  897. }
  898.  
  899.  
  900. //  ================ setCrackShatterOptionVars ================
  901. //
  902. //  SYNOPSIS
  903. //      Set the shatter clip effect option box optionVars.
  904. //
  905. //  INPUT ARGUMENTS
  906. //        int $setFactorySettings whether to use default settings.
  907. //
  908. //  OPTION VARIABLES
  909. //
  910. //        Variable        |   Type    | Values                | Default    | Notes
  911. //      ----------------+-----------+-----------------------+-----------+--------
  912. //      shatter name     :    string    | any string             : crackShatter    : 
  913. //      crack count     :    integer    | > 0                     : 5         : 
  914. //      crack length     :    integer    | > 0                     : 50        : 
  915. //      triangulate        :    integer | on/off                : on        : 
  916. //      post operation     :    string    | shapes/sets/soft/rigid: sets        : 
  917. //      edge Perturb    :    float   | >= 0.0                 : 0.0        : 
  918. //      seed            :    integer | 0 - 100                : 0            : 
  919. //      verbose            :    integer | on/off                : off        : 
  920. //
  921. global proc setCrackShatterOptionVars (int $setFactorySettings)
  922. {
  923.     if( $setFactorySettings || !`optionVar -exists shatterCrackName` ) 
  924.     {
  925.         optionVar -stringValue shatterCrackName "crackShatter"; 
  926.     } 
  927.     if( $setFactorySettings || !`optionVar -exists shatterCrackCount` ) 
  928.     {
  929.         optionVar -intValue shatterCrackCount 5; 
  930.     } 
  931.     if( $setFactorySettings || !`optionVar -exists shatterCrackLength` ) 
  932.     {
  933.         optionVar -intValue shatterCrackLength 200; 
  934.     } 
  935.     if( $setFactorySettings || !`optionVar -exists shatterCrackTriangulate` ) 
  936.     {
  937.         optionVar -intValue shatterCrackTriangulate true; 
  938.     } 
  939.     if( $setFactorySettings || !`optionVar -exists shatterCrackExtrude` ) 
  940.     {
  941.         optionVar -floatValue shatterCrackExtrude 0.0; 
  942.     } 
  943.     if( $setFactorySettings || !`optionVar -exists shatterCrackPostOperation` ) 
  944.     {
  945.         optionVar -stringValue shatterCrackPostOperation "shapes" ; 
  946.     } 
  947.     if( $setFactorySettings || !`optionVar -exists shatterCrackEdgePerturbation` ) 
  948.     {
  949.         optionVar -floatValue shatterCrackEdgePerturbation 0.0; 
  950.     } 
  951.     if( $setFactorySettings || !`optionVar -exists shatterCrackVerbose` ) 
  952.     {
  953.         optionVar -intValue shatterCrackVerbose false; 
  954.     } 
  955.     if( $setFactorySettings || !`optionVar -exists shatterCrackOriginal` ) 
  956.     {
  957.         optionVar -intValue shatterCrackOriginal 1; 
  958.     } 
  959.     if( $setFactorySettings || !`optionVar -exists shatterCrackMakeRigidBody` ) 
  960.     {
  961.         optionVar -intValue shatterCrackMakeRigidBody 1; 
  962.     } 
  963.     if( $setFactorySettings || !`optionVar -exists shatterCrackSeedValue` ) 
  964.     {
  965.         optionVar -intValue shatterCrackSeedValue 0; 
  966.     } 
  967. }
  968.  
  969.  
  970.